﻿using Kele.Activity.Core;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;

namespace Kele.Activity.Web.Controllers.V1
{
    public  class ActivityH5Controller : SiteApiController
    {
    
        [HttpGet]
        [Route("list")]
        public async Task<IActionResult> H5_GetActivityList(int take = 10, int skip = 0)
        {
            var result = await AppService.Activity.H5_GetActivityListAsync(take, skip);
            return OkResult(result);
        }

        [HttpGet]
        [Route("detail")]
        public async Task<IActionResult> H5_GetActivity(int activity_id)
        {
            var ret = await AppService.Activity.H5_GetActivityDetailAsync(UserId, activity_id);
            return OkResult(ret);
        }

       

        [HttpGet]
        [Route("voucher")]
        public async Task<IActionResult> H5_GetActivityVoucher(string id)
        {
            var result = await AppService.Activity.LoadActivityVoucherAsync(OpenId, id);
            return OkResult(result);
        }
    }
}